<template>
  <div class="move-view">
    <div class="title">
      <div class="box">
        <div style="margin: 0 55px 0 10px; color: #fff; font-size: 30px">
          <van-icon name="arrow-left" />
        </div>
        <span class="ti"> 嘉兆文投影城（卓为城店）</span>
      </div>
      <div class="addr">
        <div class="address">
          <div class="stores">嘉兆文投影城（卓为城店）</div>
          <div class="place">
            大朗镇求富路社区长富西路268号“卓为城”项目三层301、303、304、305号商铺
          </div>
        </div>
        <div class="cinema-info">
          <van-icon name="location-o" color="#007aff" size="28" />
        </div>
      </div>
    </div>
    <div>
      <div class="sw">
        <div class="swiper">
          <div class="swiper-wrapper">
            <div class="swiper-slide" v-for="item in moveo" :key="item.id">
              <img :src="`${item.img}`" />
            </div>
          </div>
        </div>
      </div>
      <div class="movie-info">
        <div class="movie-title">
          <span class="movie-name">明日战记</span
          ><span class="score">9.1 <span class="small">分</span> </span>
        </div>
        <div class="movie-desc">99分钟 | 动作 | 古天乐,刘青云,刘嘉玲</div>
      </div>
    </div>
    <div class="data">
      <div class="data-con">今天8月24日</div>
    </div>
    <div class="vip-tips">
      <van-button type="primary" size="mini" color="#ff941a">折扣</van-button>
      <div class="text1">现在开卡，首单1张票最高立减5元</div>
      <div class="text2">9.9元起开卡</div>
    </div>
    <div>
      <div class="session">
        <div class="show-item-wrap">
          <div class="left">
            <div class="begin">11:00</div>
            <div class="end">12:39散场</div>
          </div>
          <div class="midd">
            <div class="la">粤语 2D</div>
            <div class="one">1号厅(观影请佩<br />戴口罩)</div>
          </div>
          <div class="money">
            <span class="d">￥</span>
            <span class="f">38</span>
            <div class="ko">
              <span class="kou">折扣卡</span>
              <span class="cheap">￥30</span>
            </div>
            <div class="first">折扣卡首单特惠</div>
          </div>
          <div class="but" @click="onClick">
            <van-button plain type="info" color="red" size="small"
              >购票</van-button
            >
          </div>
        </div>
        <div class="show-item-wrap">
          <div class="left">
            <div class="begin">11:00</div>
            <div class="end">12:39散场</div>
          </div>
          <div class="midd">
            <div class="la">粤语 2D</div>
            <div class="one">1号厅(观影请佩<br />戴口罩)</div>
          </div>
          <div class="money">
            <span class="d">￥</span>
            <span class="f">38</span>
            <div class="ko">
              <span class="kou">折扣卡</span>
              <span class="cheap">￥30</span>
            </div>
            <div class="first">折扣卡首单特惠</div>
          </div>
          <div class="but" @click="onClick">
            <van-button plain type="info" color="red" size="small"
              >购票</van-button
            >
          </div>
        </div>
        <div class="show-item-wrap">
          <div class="left">
            <div class="begin">11:00</div>
            <div class="end">12:39散场</div>
          </div>
          <div class="midd">
            <div class="la">粤语 2D</div>
            <div class="one">1号厅(观影请佩<br />戴口罩)</div>
          </div>
          <div class="money">
            <span class="d">￥</span>
            <span class="f">38</span>
            <div class="ko">
              <span class="kou">折扣卡</span>
              <span class="cheap">￥30</span>
            </div>
            <div class="first">折扣卡首单特惠</div>
          </div>
          <div class="but" @click="onClick">
            <van-button plain type="info" color="red" size="small"
              >购票</van-button
            >
          </div>
        </div>
        <div class="show-item-wrap">
          <div class="left">
            <div class="begin">11:00</div>
            <div class="end">12:39散场</div>
          </div>
          <div class="midd">
            <div class="la">粤语 2D</div>
            <div class="one">1号厅(观影请佩<br />戴口罩)</div>
          </div>
          <div class="money">
            <span class="d">￥</span>
            <span class="f">38</span>
            <div class="ko">
              <span class="kou">折扣卡</span>
              <span class="cheap">￥30</span>
            </div>
            <div class="first">折扣卡首单特惠</div>
          </div>
          <div class="but" @click="onClick">
            <van-button plain type="info" color="red" size="small"
              >购票</van-button
            >
          </div>
        </div>
        <div class="show-item-wrap">
          <div class="left">
            <div class="begin">11:00</div>
            <div class="end">12:39散场</div>
          </div>
          <div class="midd">
            <div class="la">粤语 2D</div>
            <div class="one">1号厅(观影请佩<br />戴口罩)</div>
          </div>
          <div class="money">
            <span class="d">￥</span>
            <span class="f">38</span>
            <div class="ko">
              <span class="kou">折扣卡</span>
              <span class="cheap">￥30</span>
            </div>
            <div class="first">折扣卡首单特惠</div>
          </div>
          <div class="but" @click="onClick">
            <van-button plain type="info" color="red" size="small"
              >购票</van-button
            >
          </div>
        </div>
        <div class="show-item-wrap">
          <div class="left">
            <div class="begin">11:00</div>
            <div class="end">12:39散场</div>
          </div>
          <div class="midd">
            <div class="la">粤语 2D</div>
            <div class="one">1号厅(观影请佩<br />戴口罩)</div>
          </div>
          <div class="money">
            <span class="d">￥</span>
            <span class="f">38</span>
            <div class="ko">
              <span class="kou">折扣卡</span>
              <span class="cheap">￥30</span>
            </div>
            <div class="first">折扣卡首单特惠</div>
          </div>
          <div class="but" @click="onClick">
            <van-button plain type="info" color="red" size="small"
              >购票</van-button
            >
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import axios from "axios";
import { Icon } from "vant";
import Swiper from "swiper";
import "swiper/css";
import { Button } from "vant";
export default {
  name: "MoveView",
  data() {
    return {
      moveo: [],
      date: [],
    };
  },
  methods: {
    onClick() {
      this.$router.replace({ name: "select" });
    },
  },

  components: {
    [Icon.name]: Icon,
    [Button.name]: Button,
  },
  mounted() {
    new Swiper(".swiper", {
      slidesPerView: 4,
      spaceBetween: 5,
      centeredSlides: true,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
    });

    axios
      .get(
        "/mmaoyan/mtrade/cinema/cinema/shows.json?cinemaId=27922&ci=30&userid=&channelId=4"
      )
      .then(({ data }) => {
        this.moveo.push(...data.data.movies);
        this.moveo.forEach((item) => {
          console.log(item);
        });
      });
    //   axios
    // .get("/mmaoyan/mtrade/cinema/cinema/shows.json?cinemaId=27922&ci=30&userid=&channelId=4")
    //   .then(({ data }) => {
    //     console.log(data)
    //     console.log(...data.data.movies)
    //     this.date.push(...data.data.movies);
    //     this.date.forEach((item)=>{
    //       console.log(item)
    //     })
    //   })
  },
};
</script>
<style scoped lang="scss">
.title {
  .box {
    height: 50px;
    background-color: #e54847;
    text-align: center;
    line-height: 50px;
    display: flex;

    .ti {
      color: #fff;
      font-size: 18px;
    }
  }
  .addr {
    position: relative;
    .cinema-info {
      position: absolute;
      right: 0;
      top: 50%;
      width: 70px;
      height: 31px;
      border-left: solid #eee thin;
      // -webkit-transform: translateY(-50%);
      transform: translateY(-50%);
      text-align: center;
    }
    .address {
      padding: 15px 100px 15px 15px;

      .stores {
        font-size: 17px;
        line-height: 24px;
        font-weight: 700;
        color: #333;
      }
      .place {
        margin-top: 2px;
        font-size: 13px;
        line-height: 18.5px;
        color: #999;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
}
.sw {
  height: 114px;
  padding: 15px 0;
  background-color: #40454d;
  // opacity: 0.88;
  .swiper {
    width: 100%;
    // height: 109px;
    img {
      width: 100%;
      height: 100%;
    }
    .swiper-slide {
      text-align: center;
      font-size: 18px;
      background: #fff;

      /* Center slide text vertically */
      display: -webkit-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      -webkit-box-pack: center;
      -ms-flex-pack: center;
      -webkit-justify-content: center;
      justify-content: center;
      -webkit-box-align: center;
      -ms-flex-align: center;
      -webkit-align-items: center;
      align-items: center;
      transition: 300ms;
      transform: scale(0.8);
    }
    .swiper-slide-active,
    .swiper-slide-duplicate-active {
      transform: scale(1);
    }
  }
}
.movie-info {
  padding: 11px 15px;
  text-align: center;
  border-bottom: 1px solid #ccc;
  .movie-title {
    .movie-name {
      height: 24px;
      line-height: 24px;
      font-size: 17px;
      color: #333;
      font-weight: 700;
      margin-right: 5px;
    }
    .score {
      color: #ffb400;
      font-size: 16px;
      font-weight: 700;
      .small {
        font-size: 10px;
      }
    }
  }
  .movie-desc {
    margin-top: 2px;
    height: 18.5px;
    line-height: 18.5px;
    font-size: 13px;
    color: #999;
  }
}
.data {
  width: 100%;
  height: 45px;
  background-color: skyblue;
  .data-con {
    width: 82px;
    color: #f03d37;
    margin-left: 15px;
    font-size: 14px;
    line-height: 42px;
    border-bottom: 3px solid #f03d37;
    box-sizing: border-box;
  }
}
.vip-tips {
  display: flex;
  justify-content: space-evenly;
  font-size: 12px;
  height: 42px;
  background: #fff5ea;
  line-height: 42px;
  .van-button--mini[data-v-6dbb3150] {
    height: 18px;
    margin-top: 11px;
  }
  .text1 {
    color: #fa9600;
    width: 228px;
  }
  .text2 {
    color: #999;
  }
}
.van-button--plain[data-v-6dbb3150] {
  border-radius: 50px;
  width: 52px;
  height: 30px;
}
.session {
  display: flex;
  flex-direction: column;

  .show-item-wrap {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 17px 5px;
    height: 56px;
    border-bottom: solid #eee 1px;
    // line-height: 15px;

    .begin {
      font-size: 20px;
      color: #333;
      line-height: 1;
      white-space: nowrap;
    }
    .end {
      margin-top: 10px;
      color: #999;
      font-size: 11px;
      line-height: 1;
      white-space: nowrap;
    }
    .la {
      margin-top: 2px;
      line-height: 18px;
      font-size: 13px;
      color: #333;
      white-space: normal;
    }
    .one {
      margin-top: 7px;
      font-size: 11px;
      color: #999;
      white-space: normal;
    }
    .d {
      color: #f03d37;
      font-size: 11px;
    }
    .f {
      display: inline-block;
      // line-height: 1;
      line-height: 19px;
      color: #f03d37;
      // margin-top: 1px;
      font-size: 19px;
    }
    .kou {
      color: #fff;
      font-size: 12px;
      border: 1px solid #ff9000;
      background-color: #ff9000;
      // padding: 0 2px;
      // border-radius: 3px;
    }
    .ko {
      border: 1px solid #ff9000;
      height: 14px;
      display: inline-block;
      line-height: 12px;
      margin-bottom: 3px;
      margin-left: 3px;
      .cheap {
        font-size: 12px;
        color: #ff9000;
      }
    }
    .first {
      margin-top: 5px;
      display: block;
      font-size: 11px;
      color: #999;
    }
  }
}
</style>
